package com.archgeek.rpc.grpc.server;

import com.archgeek.rpc.grpc.service.impl.GreetingServiceImpl;
import io.grpc.Server;
import io.grpc.ServerBuilder;

import java.io.IOException;

/**
 * @author pizhihui
 * @date 2024-05-23 16:53
 */
public class ServerEntry {


    public static void main(String[] args) throws InterruptedException, IOException {


        Server server = ServerBuilder.forPort(9056)
                .addService(new GreetingServiceImpl())
                .build();

        server.start();


        server.awaitTermination();

    }

}
